package com.sleep.blog.vo;

/**
 * @author Sleep-6000
 * @date 2021/9/14
 */
public enum ErrorCode {
    // 错误码
    SYSTEM_ERROR(-6000, "系统内部异常"),
    PARAMS_ERROR(10001, "参数有误"),
    ACCOUNT_PWD_NOT_EXIST(10002, "用户名不存在或密码错误"),
    TOKEN_ERROR(10003, "token不合法"),
    ACCOUNT_EXIT(10004, "账户已被注册"),
    UPLOAD_FAIL(20001,"上传失败"),
    NO_PERMISSION(70001, "无访问权限"),
    SESSION_TIME_OUT(90001, "会话超时"),
    NO_LOGIN(90002, "未登录"),
    ;

    private int code;
    private String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
